package com.wlld.yolo;

import com.wlld.MatrixTools.Matrix;
import com.wlld.i.OutBack;

/**
 * @param
 * @DATA
 * @Author LiDaPeng
 * @Description
 */
public class ConvBack implements OutBack {
    private Matrix matrix;
    private double XDist;
    private double YDist;
    private double width;
    private double height;
    private double confidence;

    public double getXDist() {
        return XDist;
    }

    public double getYDist() {
        return YDist;
    }

    public double getWidth() {
        return width;
    }

    public double getHeight() {
        return height;
    }

    public double getConfidence() {
        return confidence;
    }


    public Matrix getMatrix() {
        return matrix;
    }

    @Override
    public void getBack(double out, int id, long eventId) {
        switch (id) {
            case 1:
                confidence = out;
                break;
            case 2:
                width = out;
                break;
            case 3:
                height = out;
                break;
            case 4:
                XDist = out;
                break;
            default:
                YDist = out;
                break;
        }
    }

    @Override
    public void getBackMatrix(Matrix matrix, long eventId) {
        this.matrix = matrix;
    }
}
